package com.example.parser;

public class ParserBase {
	boolean isProcessing=false;
	int CURENT_PROCESS_TAG=0;	
	String status = "";
	int tag;
	Thread prsThread;
	
	public String getStatus() {
		return status;
	}

	public int getTag() {
		return tag;
	}

	public void setTag(int tag) {
		this.tag = tag;
	}
	
	Boolean checkIsCurrentTag(int processTag)
	{
		return CURENT_PROCESS_TAG==processTag? true:false;
	}
	
	public void cancle()
	{
		//delegate=null;
		//isProcessing=false;
		if(CURENT_PROCESS_TAG>=100)
			CURENT_PROCESS_TAG=0;
		CURENT_PROCESS_TAG++;
		
		try
		{
			if(prsThread.isAlive())
//				prsThread.stop();
			prsThread.interrupt();
				
		}catch(Exception ex)
		{
			
		}
	}
}
